﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SqlScriptVault.Model
{
    [Serializable]
    public class UpdateFileHistory : IHistory
    {
        private readonly string _scriptName;
        private readonly string _previousScriptContent;
        private readonly string _nextScriptContent;

        public UpdateFileHistory(string scriptName, string previousScriptContent, string nextScriptContent)
        {
            _scriptName = scriptName;
            _previousScriptContent = previousScriptContent;
            _nextScriptContent = nextScriptContent;

            EventDate = DateTime.Now;
        }

        public DateTime EventDate { get; private set; }

        public string ImageName
        {
            get { return "../Images/History-icon.png"; }
        }

        public string EventName
        {
            get { return string.Format("Updated file {0}", _scriptName); }
        }
    }
}
